package interfaces;

import java.sql.Connection;
import java.sql.Statement;
import java.util.List;

import Utils.Concurrent.TaskRunError;

import datatype.User;

/**
 * 
 */

/**
 * @author Yuval
 * @author yosi & ortal
 * 
 * 
 */
public interface UserManagement {

	public User getUserFromDB(String userName, String password, Statement stm)
			throws TaskRunError;

	public int createUserInDB(String first_name, String last_name,
			String password, String user_name, Statement stm) throws TaskRunError;

	public boolean changePass(int userID, String newPassword, Statement stm)
			throws TaskRunError;

	public List<User> getAllUsers(Statement stm) throws TaskRunError;

	public boolean changeUsersPriv(List<Integer> toAdmin, List<Integer> toPlayer, Statement stm)
			throws TaskRunError;

	public boolean deleteUsers(List<Integer> users , Statement stm) throws TaskRunError;

	public boolean isUsernameExist(String username, Statement stm) throws TaskRunError;

	public boolean updateUserScore(int userID, int score , String mod, Statement stm)
			throws TaskRunError;

	public boolean createAdmin(Statement stmt) throws TaskRunError;

}
